package com.bdqn.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.bdqn.pojo.Right;
import com.bdqn.pojo.Role;
import com.bdqn.pojo.User;
import org.springframework.data.domain.Pageable;

import java.util.List;


public interface RoleService extends IService<Role> {

    /**
     * 获取所有角色信息
     *
     * @return
     */
    List<Role> findAll();
    List<Role> findAllRoles();
    Role saveRole(Role role);
    void deleteRoleById(Long roleId);
    void deleteRole(Role role);
    Role getRole(Long roleId);
    Page<Role> findRole(String roleName, Pageable pageable);
    List<Right> findRightsByRole(Role role);
    List<Right> findAllRights();
    Role findRoleByUsers(User user);
    void reloadFilterChainDefinitions();
}
